<div class="top shadow">
</div>

<div class="content">
<?=$user_menu?>
<?php
$id = array(
	'name'	=> 'id',
	'id'	=> 'id',
	'value'	=> set_value('id', $g->id),
	'size'	=> 10,
	'disabled'	=> 'disabled',
);
$name = array(
	'name'	=> 'name',
	'id'	=> 'name',
	'value'	=> set_value('name', $g->name),
	'maxlength'	=> 100,
	'size'	=> 40,
);
$description= array(
	'name'	=> 'description',
	'id'	=> 'description',
	'value'	=> set_value('description', $g->description),
	'maxlength'	=> 2000,
	'rows'	=> 10,
	'cols'	=> 24,
);
$published= array(
	'name'	=> 'published',
	'id'	=> 'published',
	'value'	=> 1,
	'checked'	=> set_value('published', $g->published),
);
?>

<?=form_open(); ?>
<table>
	<tr>
		<td><?=form_label('Gallery ID', 'id'); ?></td>
		<td><?=form_input($id); ?></td>
	</tr>
	<tr>
		<td><?=form_label('Gallery name', 'name'); ?></td>
		<td><?=form_input($name); ?></td>
		<td style="color: red;"><?=(isset($g)) ? $g->error->name : ''?></td>
	</tr>
	<tr>
		<td><?=form_label('Description', 'description'); ?></td>
		<td><?=form_textarea($description); ?></td>
		<td style="color: red;"><?=(isset($g)) ? $g->error->description : ''?></td>
	</tr>
	<tr>
		<td><?=form_label('Published', 'published'); ?></td>
		<td><?=form_checkbox($published); ?></td>
		<td style="color: red;"><?=(isset($g)) ? $g->error->published : ''?></td>
	</tr>
</table>
<?=form_submit('submit', 'Update gallery!'); ?>
<?=form_close(); ?>

</div>